#include<stdio.h>
#include<math.h>
#include<string.h>
void Shie(int n, double a[], double *p, double *q);
double a[20];

int main()
{
	int n;
	double p=0,q=0;
	scanf("%d",&n);
	for(int i=n;i>=0;i--)
	{
		scanf("%lf",&a[i]);
	}
	Shie(n,a,&p,&q);
	printf("%.6lf %.6lf",p,q);
	return 0;
}



void Shie(int n, double a[], double *p, double *q) 
{
    double eps = 1e-12;
    double b[20];
    double c[20];
   
    memset(b, 0, sizeof(b));
   
    memset(c, 0, sizeof(c));
    *p = 0;
    *q = 0;
    double dp = 1;
    double dq = 1;
    while (dp > eps || dp < -eps || dq > eps || dq < -eps)  
    {
	double p0 = *p;
	double q0 = *q;
	b[n - 2] = a[n];
	c[n - 2] = b[n - 2];
	b[n - 3] = a[n - 1] - p0 * b[n - 2];
	c[n - 3] = b[n - 3] - p0 * b[n - 2];
	int j;
	for (j = n - 4; j >= 0; j--) {
            b[j] = a[j + 2] - p0 * b[j + 1] - q0 * b[j + 2];
  	    c[j] = b[j] - p0 * c[j + 1] - q0 * c[j + 2];
	}
	double r = a[1] - p0 * b[0] - q0 * b[1];
	double s = a[0] - q0 * b[0];
	double rp = c[1];
	double sp = b[0] - q0 * c[2];
	double rq = c[0];
	double sq = -q0 * c[1];
	dp = (rp * s - r * sp) / (rp * sq - rq * sp);
	dq = (r * sq - rq * s) / (rp * sq - rq * sp);
	*p += dp;
	*q += dq;
    }
    return;
}